﻿using System;
using System.Data;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using HRM.DICTIONARY.DAL;
using EFERP;

namespace HRM.DICTIONARY.UI
{
    public partial class xfrmWorkEmployee : XtraForm
    {
        private int m_Status;
        private int m_Type;
        public event SelectedEventHander Selected;
        public delegate void SelectedEventHander(object sender, DataTable Table);

        public xfrmWorkEmployee()
        {
            this.m_Status = 1;
            this.m_Type = 0;
            InitializeComponent();
        }

        public xfrmWorkEmployee(int Status)
        {
            this.components = null;
            this.m_Status = 1;
            this.m_Type = 0;
            this.InitializeComponent();
            this.m_Status = Status;
            //this.Init();
        }

        public xfrmWorkEmployee(int Status, int Type)
        {
            this.components = null;
            this.m_Status = 1;
            this.m_Type = 0;
            this.InitializeComponent();
            this.m_Status = Status;
            this.m_Type = Type;
            //this.Init();
        }

        public void SelectEmployee()
        {
            //DataTable dataTable;//if (this.m_Type == 0)
            //{
            //    dataTable = this.xucListEmployee1.GetDataTable();
            //}
            //else
            //{
            //    dataTable = this.xucListInsurance1.GetDataTable();
            //}

            //if (dataTable.Rows.Count <= 0)
            //{
            //    XtraMessageBox.Show("vui lòng chọn danh sách nhân viên để phát sinh dữ liệu sinh dữ liệu!", "Thông Báo", MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk);
            //}
            //else
            //{
            //    this.RaiseSelectedEventHander(dataTable);
            //}
        }
    }
}
